//无阻塞顺序加载js文件
// 由页面少量的代码，加载丰富的功能组件
function loadScript(url,scrCallback,fileCallback) {
    //将参数，保存
    var param_array = arguments;

    var arr_url = new Array();
    if(typeof url === 'object'){//如果是数组
        arr_url = url;
    }else if(typeof url === 'string'){//如果是个字符串
        arr_url.push(url);
    }

    var completeNum = 0;
    var len = arr_url.length;
    for(var i = 0; i < len ; i++){
        var script  = document.createElement("script");
        script.type  = 'text/javascript';
        if(script.readyState){//ie
            script.onreadystatechange = function () {
                //ie标识最终readyState的值不一致，防止onreadystatechange重复调用，
                // 所以满足一个条件就删除readystatechange事件
                if(script.readyState == 'loaded' ||　script.readyState == 'complete' ){
                    script.onreadystatechange = null;

                }
            }
        }else{
            script.onload = function () {
                //判断传达参数，如果大于两个参数，单次回调函数每次只需
                //最终函数，满足条件执行
                //            completeNum+=1;
                if ( param_array.length > 2){//三个参数
                    param_array[1]();
                    if ( completeNum == len){
                        param_array[2]();
                    }
                }else if( param_array.length == 2) {//两个参数
                        if ( completeNum == len) {
                            param_array[1]();
                        }
                }

            };
        }
        script.src = arr_url[i];
        document.getElementsByTagName("head")[0].appendChild(script);
    }
}